

<template>
  <div>
    <h1>{{ price | pricement(2) }}</h1>
    <MyHeader v-bind="person" />
    <Count :num="3" />
  </div>
</template>

<script>
import Count from "./components/Count";
import MyHeader from "./components/MyHeader";
export default {
  name: "App",
  data() {
    return {
      person: {
        name: "laowang",
        age: 18,
        sex: "nan",
      },
      price: 100,
    };
  },
  components: {
    Count,
    MyHeader,
  },
  filters: {
    pricement(price, num) {
      return "¥" + price.toFixed(num);
    },
  },
};
</script>

<style>
</style>